﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/Content.Master" AutoEventWireup="true" CodeBehind="NewsFeed_News.aspx.cs" Inherits="RED_NET.ContentPage.NewsFeed.NewsFeed_News" Title="无标题页" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <link type="text/css" rel="Stylesheet" href="../../Image_Css/NewsFeedCss/NewsOfNewsFeed.css" />
    <div id="ChooseTypeOfNewsFeed">
        <asp:Button ID="NewsFeedOfPhoto" runat="server" Text="相片的最新动态" 
            onclick="NewsFeedOfPhoto_Click" />
        <asp:Button ID="Button1" runat="server" Text="日志的最新动态" 
            onclick="Button1_Click" />
    </div>
    <div class="New1">
    <asp:GridView ID="GridView1" runat="server"  DataSourceID="ObjectDataSource1"
     AutoGenerateColumns="False" ShowHeader="False" Width="96%" BorderWidth="2px" 
        GridLines="None" AllowPaging="True" BackColor="White" BorderColor="White" 
            BorderStyle="Ridge" CellPadding="3" CellSpacing="1" >
        <RowStyle BackColor="#DEDFDE" ForeColor="Black" />
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                  <div id="Trends">
                    <div id="GrdAvatar">
                        <asp:Image ID="Image1" Width="50px" Height="50px" ImageUrl='<%# Eval("_AvatarUrl") %>' runat="server" />
                    </div>
                    <div id="GrdInfoOfTrends">
                        <div id="GrdTop">
                            <asp:HyperLink ID="HyperLink2" runat="server" Text='<%#Eval("_NickName")%>'
                               NavigateUrl='<%#"~/ContentPage/User/MainPage.aspx?VISIT_ID="+Eval("_UId") %>'
                                Target="_blank"></asp:HyperLink>
                            &nbsp&nbsp 发表了 &nbsp&nbsp
                            <asp:HyperLink ID="HyperLink1" runat="server" Text='<%#Eval("_Title")%>'
                             NavigateUrl='<%#"~/ContentPage/News/ShowDaily.aspx?_Id=" + Eval("_Id") +
                             "&VISIT_ID=" + Eval("_UId") %>' Target="_blank"></asp:HyperLink>
                        </div>
                        <div id="GrdBody">
                            <%#Eval("_Content") %>
                        </div>
                        <div id="GrdFoot">
                            <p>
                            <%#Eval("_UpdateTime") %>
                            回复(<%#Eval("_ReplyNum") %>)
                            </p>
                        </div>
                    </div>
                  </div>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
        <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
        <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" />
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
    SelectMethod="GetNewsFeedOfNewsOfFriends" 
    TypeName="RED_NET_Core.BLL.NewsFeed_BLL">
        <SelectParameters>
            <asp:SessionParameter DefaultValue="0" Name="UId" SessionField="USER_ID" 
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    
    <asp:GridView ID="GridView2" runat="server" DataSourceID="ObjectDataSource2"
     AutoGenerateColumns="False" ShowHeader="False" Width="96%" BorderWidth="2px" 
            GridLines="None" AllowPaging="True" BackColor="White" BorderColor="White" 
            BorderStyle="Ridge" CellPadding="3" CellSpacing="1">
        <RowStyle BackColor="#DEDFDE" ForeColor="Black" />
        <Columns>
           <asp:TemplateField>
              <ItemTemplate>
                <div id="HolePartOfGrd2">
                 <div id="GrdAvatar2">
                    <asp:Image ID="Image1" runat="server"  ImageUrl='<%# Eval("_AvatarUrl") %>' Width="50px" Height="50px" />
                 </div>
                 <div id="GrdBody2">
                    <div id="top2">
                      <asp:HyperLink ID="HyperLink1" runat="server" Text='<%#Eval("_NickName")%>'
                       NavigateUrl='<%#"~/ContentPage/User/MainPage.aspx?VISIT_ID="+Eval("_PhotoOfUId") %>'
                       Target="_blank"></asp:HyperLink>
                      &nbsp&nbsp 更新相片 &nbsp&nbsp
                      <asp:HyperLink ID="HyperLink3" runat="server" Text='<%#Eval("_PhotoName") %>'
                          NavigateUrl='<%#"~/ContentPage/OverPhoto.aspx?VISIT_ID=" + Eval("_PhotoOfUId") + 
                          "&Photo_ID=" + Eval("_PhotoId") + "&Album_ID=" + Eval("_PhotoOfAlbumId") %>' Target="_blank"></asp:HyperLink>
                    </div>
                    <div id="middle2">
                      <asp:Image ID="Image2" runat="server" ImageUrl='<%# Eval("_PhotoUrl") %>' />
                      <div id="geli2"></div>
                      <%# Eval("_PhotoContent") %>
                    </div>
                    <div id="foot2">
                      <%# Eval("_PhotoUpdateTime") %>
                    </div>
                 </div>
                </div>
              </ItemTemplate>
           </asp:TemplateField>
        </Columns>
        <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
        <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
        <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" />
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
        SelectMethod="GetNewsFeedOfPhotoOfFriends" 
        TypeName="RED_NET_Core.BLL.NewsFeed_BLL">
        <SelectParameters>
            <asp:SessionParameter DefaultValue="1" Name="uid" 
                SessionField="Session[&quot;USER_ID&quot;]" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    </div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
</asp:Content>
